#ifndef MTQGRAPHICSIMAGE_H
#define MTQGRAPHICSIMAGE_H

#include <QGraphicsPixmapItem>
#include <QGraphicsSceneMouseEvent>
#include <map>
#include "qtuiolistener.h"
class MTQGraphicsImage : public QGraphicsPixmapItem
{

public:
    MTQGraphicsImage( const QPixmap & pixmap, QGraphicsItem * parent = 0 );
    void onTouch(int touchId, double x, double y, int type);
private:
    QMap<int,QPointF> touches;
    
    void mouseMoveEvent( QGraphicsSceneMouseEvent * event);
    void rotateZoomMove(int touchId, QPointF pos);
    int findSecondTouch(int touchId);
    bool onTouchDown(int touchId, QPointF pos);
    bool onTouchUp(int touchId, QPointF pos);
    bool onTouchMove(int touchId, QPointF pos);

};

#endif // MTQGRAPHICSIMAGE_H
